package com.example.mapper.configuration;

import com.example.bean.configuration.LieBiao;
import com.example.bean.configuration.ZhiBiaoGuanLi;
import com.example.bean.configuration.vo.ZhiBiaoGuanLiVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

@Repository
public interface ZhiBiaoGuanLiMapper {

    List<ZhiBiaoGuanLi> getpage(ZhiBiaoGuanLiVo vo);

    Integer addzbgl(ZhiBiaoGuanLi zhiBiaoGuanLi);

    @Insert("insert into xz_liebiao values(replace(uuid(),'-',''), #{zhibiao}, #{status}, #{noid})")
    void addxiangzhi(String noid, String zhibiao, Integer status);
    @Select("select * from zhibiao where noid = #{aid}")
    ZhiBiaoGuanLi getId(String aid);
    @Select("SELECT zhibiao, status FROM xz_liebiao WHERE zb_id = #{aid}")
    ArrayList<LieBiao> getliebiao(String aid);
    @Delete("delete from xz_liebiao where zb_id = #{noid}")
    Integer delliebiao(String noid);
    @Update("update zhibiao set zbx_name = #{zbxname}, leibie = #{leibie}, kj_leixing = #{kjleixing}, status = #{status}, cj_name = #{cjname} where noid = #{noid}")
    Integer editzbgl(ZhiBiaoGuanLi zhiBiaoGuanLi);

    Integer dels(List<String> ids);
}
